﻿<UserControl x:Class="Patterns4Net.ArchitectureExplorer.Views.StringsListView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             Height="130" d:DesignWidth="400">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        
		<Border BorderBrush="Transparent" BorderThickness="0">
			<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
                <ListView Grid.Column="0" Grid.Row="0" ItemsSource="{Binding Items}" SelectedItem="{Binding Path=SelectedItem}">
					<ListView.ItemContainerStyle>
						<Style TargetType="ListViewItem">
							<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
						</Style>
					</ListView.ItemContainerStyle>        	
		        	<ListView.ItemTemplate>
		        		<DataTemplate>
		        			<StackPanel>
		        				<TextBlock Text="{Binding Path=.}" Margin="5, 0, 0, 0"/>
								<Separator/>
							</StackPanel>
						</DataTemplate>     	
					</ListView.ItemTemplate>
		        </ListView>
			</ScrollViewer>
		</Border>
        
        <StackPanel Grid.Column="1" Grid.Row="0" Margin="20, 5, 10, 5">
            <StackPanel.Resources>
                <Style TargetType="Button">
                    <Setter Property="Margin" Value="0, 4, 0, 0"/>
                </Style>
            </StackPanel.Resources>
            <TextBlock>New item:</TextBlock>
            <TextBox x:Name="NewItem" MinWidth="120" Width="Auto"/>
            <Button x:Name="AddNew">Add new</Button>
            <Button x:Name="Remove">Remove selected</Button>
            <Button x:Name="Reset">Default values</Button>
        </StackPanel>
        
    </Grid>
</UserControl>
